<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/2 0002
 * Time: 14:45
 */

namespace app\admin\controller;


use think\Container;
use think\facade\Cache;
use thinkAuth\Auth;

class IndexController extends BaseController
{
    public function index()
    {
        $auth = Auth::getInstance();
//        dump(Container::get('app')->config());die;
//        $groups = $auth->getGroupsAndRolesAndAuthsByUid(1, true);
//        dump($this->request->controller(true));
//        dump($this->request->action(true));die;
//        $auth = '';
        $result  = $auth->checkAuths(1, true);
//        dump($result);
//        dump(Cache::get('user_info_key_1'));


        return $this->fetch();
    }

    public function rmAuthCache()
    {
        $auth = Auth::getInstance();
        $auth->rmAuthCache(1);
    }
    public function index_v1()
    {
        return $this->fetch();
    }

    public function index_v2()
    {
        return $this->fetch();
    }

    public function index_v3()
    {
        return $this->fetch();
    }

    public function index_v4()
    {
        return $this->fetch();
    }

    public function index_v5()
    {
        return $this->fetch();
    }
}